#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

class C;
class D
{
public:
	friend void func(C c, D d);
protected:
	int d = 1;
};

class C
{
	friend void func(C c, D d);
private:
	D d1;
	int c;
};

void func(C c, D d)
{
	c.c;
	c.d1.d;
}

int main()
{

	return 0;
}